$(function () {
    var pwdDom           = $('#pwd');
    var confirmPwdDom    = $('#confirmPwd');
    var userId           = xhTool.getQuery('userId');
    $('#save').click(function () {
        var pwd        = pwdDom.passwordbox('getValue');
        var confirmPwd = confirmPwdDom.passwordbox('getValue');
        if(pwd == '' || confirmPwd == ''){
            window.top.sendErrorMsg('密码不能为空');
            return false;
        }
        $.ajax({
            url:baseUrl+'mobile/shortcut/savePassword',
            data:{userId:userId,password:pwd},
            type:'post',
            success:function (data) {
                window.top.sendSuccessMsg(data);
            },
            error:function (data) {
                window.top.sendErrorMsg(data['responseText']);
            }
        });
    });
});